package com.oms.common;

import com.baomidou.mybatisplus.core.enums.IEnum;
import com.oms.constant.SqlOrderEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @Author Zhang HaiLong QQ:38592077
 * @Description TODO
 * @Date 19:45 2020/3/28
 */
@Data
public class SortForm<T extends IEnum<String>> implements Serializable {
    /**
     * 排序类型 desc or asc
     */
    @ApiModelProperty(value="排序类型")
    protected SqlOrderEnum order;

    /**
     * 排序属性名
     */
    @ApiModelProperty(value="排序字段,非空")
    @NotNull(message="排序字段不能为空")
    protected T sortProperty;
}
